package com.gem.day03;

import java.util.Scanner;

public class IfDemo2 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println("请您输入分数: ");
		double score = scanner.nextDouble();
		if (score < 0 || score > 100) {
			System.err.println("非法分数: " + score);
		} else {
			String level = "";
			if (score < 60) {
				level = "不及格";
			} else if (score < 80) {
				level = "及格";
			} else if (score < 90) {
				level = "良好";
			} else {
				level = "优秀";
			}
			System.out.println("您的成绩等级为: " + level);
		}
		scanner.close();
	}
}
